POV-Ray : Newsgroups : povray.newusers : Wire View : Re: Wire View Server Time
28 Jul 2024 16:31:03 EDT (-0400)
  Re: Wire View  
From: Gyscos
Date: 28 Jun 2008 14:25:00
Message: <web.486681f417d8f3841ba56a630@news.povray.org>
Well I was'nt fully satisfied with the tutorial, since the wire were too thin
(they are flat actually since it is just on the texture) so I made another
macro, who removes the original object scaled 0.995.

Here is my macro (it uses a slave to avoid code repetition) :

#macro wireview_slave(max_value, space, toward, epsilon)
  #local temp_value = 0;
  #while (temp_value <= max_value)
    intersection {
      plane {
        toward,
        temp_value+epsilon
      }
      plane {
        -toward,
        -temp_value+epsilon
      }
    }
    intersection {
      plane {
        toward,
        -temp_value+epsilon
      }
      plane {
        -toward,
        temp_value+epsilon
      }
    }

    #local temp_value = temp_value + space;
  #end
#end

#macro wireview(cible, max_x, max_y, max_z, space, epsilon)
  intersection {
    difference {
      object {
        cible
      }
      object {
        cible
        scale 0.995
      }
    }
    union {
      wireview_slave(max_x,space,x, epsilon)
      wireview_slave(max_y,space,y, epsilon)
      wireview_slave(max_z,space,z, epsilon)

    }
  }
#end

http://gyscos.fr/images/test2.png

Problem occurs when I try it with non centered objects...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.